def make_func(x):
    def add(y):
        y += x
        def inner(z):
            return y + z + x

        return inner
    return add

add4 = make_func(1)(3)
print(add4(5))
